package com.tgy.clickhouse.exception;


import com.tgy.clickhouse.exception.error.BasicErrorType;

/**
 * 全局异常
 * @author tgy
 * @date 2021/9/2
 */
public class PredictionGlobalException extends RuntimeException{


    private static final long serialVersionUID = -3421551827383250295L;
    private BasicErrorType basicErrorType;

    private String message;

    public PredictionGlobalException(BasicErrorType basicErrorType) {
        this.basicErrorType = basicErrorType;
        this.message = basicErrorType.getMsg();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public BasicErrorType getBasicErrorType() {
        return basicErrorType;
    }

    public void setBasicErrorType(BasicErrorType basicErrorType) {
        this.basicErrorType = basicErrorType;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
